/**
 * @description 登录注册路由
 */
const express = require('express')
// 导入expressjoi
const expressJoi = require('@escook/express-joi')
// 导入验证规则
const { login_limit } = require('../limit/login.js')
// login路由处理函数
const loginHandle = require('../router_handle/login.js')

const router = express.Router()

// 注册接口
router.post('/register', expressJoi(login_limit), loginHandle.register)
// 登录接口
router.post('/login', expressJoi(login_limit), loginHandle.login)

module.exports = router
